#ifndef TRAJECTORYMODULE
#define TRAJECTORYMODULE

#include <modules\dataModule.h>
#include <base\vec2i.h>

#include <string>
#include <vector>
#include <map>

using namespace std;

#define CHAIN_SIZE 9
#define TRAJECTORY_TABLE_BASE_NAME "trajectory_tiles"

class trajectoryModule : public dataModule {

  vec2i tile_res;
  vec2i levels_interval;
  string gpxsourcefile;

  // <column, <row, vector<chain> > >
  map<unsigned int, map<unsigned int, vector<unsigned int> > > chains;

public:

  trajectoryModule(vec2i _tile_res, vec2i _levels_interval, string _gpxsourcefile);
  virtual bool post(mysqlDatabase *db);
};

#endif